
public class MessengerManager extends Messenger{

	private final int MY_GROUPID = 9;
	
	/****************************************
	 * Constructor
	 ****************************************/
	public MessengerManager() {
		super();
	}
	
	
	/****************************************
	 * Send message to our group
	 ****************************************/
	public void sendMessage(String message) {
		super.addMessage(MY_GROUPID, message);
	}
	
	
	/****************************************
	 * Send message to a specific group
	 ****************************************/
	public void sendMessage(int groupId, String message) {
		super.addMessage(groupId, message);
	}
	
	
	/****************************************
	 * Get the latest message from our group
	 ****************************************/
	public String getLatestMessage() {
		return super.getLatestMessages(MY_GROUPID, 1)[0];
	}
	
	
	/****************************************
	 * Get the latest message from a specific group
	 ****************************************/
	public String getLatestMessage(int groupId) {
		return super.getLatestMessages(groupId, 1)[0];
	}
	
	
	/****************************************
	 * Get our group id
	 ****************************************/
	public int getMyGroupId() {
		return MY_GROUPID;
	}
	
}
